Skip to content

[Basic] Remove unused inputType parameter in ProjectionDescriptor.createPojoJavaImplementation (#732) - #804

Open
AliRana30 wants to merge 1 commit into
apache:mainfrom
AliRana30:fix/projection-descriptor-unused-param-732
Open

[Basic] Remove unused inputType parameter in ProjectionDescriptor.createPojoJavaImplementation (#732)#804
AliRana30 wants to merge 1 commit into
apache:mainfrom
AliRana30:fix/projection-descriptor-unused-param-732

Conversation

@AliRana30

Copy link
Copy Markdown
Contributor

Description

Closes #732

In ProjectionDescriptor.java, the private static method createPojoJavaImplementation declared an unused parameter final BasicDataUnitType<Input> inputType. Unlike createRecordJavaImplementation (which requires RecordType to map field names to indices), POJO projections resolve fields via reflection on the POJO object at runtime and only require the field name.

Changes

  • Removed the unused inputType parameter from createPojoJavaImplementation(final String[] fieldNames) and updated its single call site in ProjectionDescriptor.
  • Marked Field field as transient in PojoImplementation to prevent NotSerializableException when the SerializableFunction is serialized across tasks/JVMs after execution.
  • Added a null check in PojoImplementation.apply to return null if the input object is null.
  • Expanded ProjectionDescriptorTest with test cases for null inputs, multi-field error handling, non-existent field error handling, and serialization round-trips.

Type of Change

  • Bug fix / Code cleanup (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Ran all tests in ProjectionDescriptorTest (5/5 passed).
  • Ran all module unit tests in wayang-basic (19/19 passed).
  • Verified compilation of downstream dependent modules (wayang-spark).

Copilot AI lite review requested due to automatic review settings September 5, 2026 21:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused parameter in function ProjectionDescriptor.createPojoJavaImplementation()

2 participants